import request from '@/utils/request'
// 查询供应商列表
export function supplierList(query) {
  return request({
    url: '/supplier/supplier/list',
    method: 'get',
    params: query
  })
}
// 查询供应商列表2
export function supplierAllList(query) {
  return request({
    url: '/supplier/supplier/allList',
    method: 'get',
    params: query
  })
}

// 供应商新增
export function supplierAdd(data) {
  return request({
    url: '/supplier/supplier',
    method: 'post',
    data: data
  })
}

// 供应商新增(工作流)
export function supplierFlowAdd(data) {
  return request({
    url: '/supplier/supplier/submit',
    method: 'post',
    data: data
  })
}

// 供应商编辑
export function supplierUpdate(data) {
  return request({
    url: '/supplier/supplier',
    method: 'put',
    data: data
  })
}

// 供应商删除
export function supplierDelete(data) {
  return request({
    url: `/supplier/supplier`,
    method: 'delete',
    params:data
  })
}

// 查询供应商详情
export function supplierDetail(supplierId) {
  return request({
    url: `/supplier/supplier/${supplierId}`,
    method: 'get'
  })
}




// 查询投标供应商列表
export function supplierBidList(query) {
  return request({
    url: '/supplier/supplierBid/list',
    method: 'get',
    params: query
  })
}

// 投标供应商新增
export function supplierBidAdd(data) {
  return request({
    url: '/supplier/supplierBid',
    method: 'post',
    data: data
  })
}

// 投标供应商新增(工作流)
export function supplierBidFlowAdd(data) {
  return request({
    url: '/supplier/supplierBid/supplierSubmit',
    method: 'post',
    data: data
  })
}

// 投标供应商编辑
export function supplierBidUpdate(data) {
  return request({
    url: '/supplier/supplierBid',
    method: 'put',
    data: data
  })
}

// 投标供应商删除
export function supplierBidDelete(data) {
  return request({
    url: `/supplier/supplierBid`,
    method: 'delete',
    params:data
  })
}

// 查询投标供应商详情
export function supplierBidDetail(supplierId) {
  return request({
    url: `/supplier/supplierBid/${supplierId}`,
    method: 'get'
  })
}

// 查询【业务分类管理】列表
export function supplierBusTypeList(query) {
  return request({
    url: `/system/dict/data/getSupplierDictList`,
    method: 'get',
    params: query
  })
}

// 新增【业务分类管理】
export function supplierBusTypeAdd(data) {
  return request({
    url: `/system/dict/data/addSupplierDict`,
    method: 'post',
    data: data
  })
}

// 修改【业务分类管理】
export function supplierBusTypeEdit(data) {
  return request({
    url: `/system/dict/data/updateSupplierDict`,
    method: 'post',
    data: data
  })
}

// 投标供应商删除
export function removeSupplierDict(id) {
    return request({
        url: `/system/dict/data/removeSupplierDict/${id}`,
        method: 'delete'
    })
}

// 查询供应商变更记录列表
export function supplierChangeLog(query) {
    return request({
        url: `/supplier/supplierChangeLog/list`,
        method: 'get',
        params: query
    })
}

export const IMPORTVENDOR = '/supplier/supplier/importSupplierData'

export const IMPORTTENDERVENDOR = '/supplier/supplierBid/importSupplierBid'